/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* 统一盒模型 */
 
}

/* 基础样式 */
body {
    color: #fff;
}

/* 背景视频 */
video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: fixed; /* 固定背景，避免滚动偏移 */
    top: 0;
    left: 0;
    z-index: -1;
}

/* 头部导航 */
.header {
    width: 100%;
    height: 70px;
    line-height: 70px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative; /* 确保在视频上方 */
}

.header-left {
    width: 160px;
    font-size: 20px;
    text-align: center;
}

.header-middle {
    width: 427px;
    display: flex;
    justify-content: space-between;
}

.header-middle-nav-1 {
    width: 86px;
    text-align: center;
    font-size: 14px;
    transition: background 0.3s;
}

.header-little {
    width: 58px;
}

.header-middle-nav-1:hover, .header-active {
    background: rgba(0, 0, 0, 0.5);
}

.header a {
    text-decoration: none;
    color: #fff;
}

/* 搜索框区域 */
.header-right {
    width: 305px;
}

.header-right-2 {
    display: flex;
    gap: 5px; /* 输入框与按钮间距 */
}

#searchInput {
    width: 185px;
    height: 35px;
    padding: 0 10px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    outline: none; /* 移除默认聚焦边框 */
}

.searchBtn {
    width: 52px;
    height: 35px;
    border: none;
    border-radius: 4px;
    background: #4e4c4cd1;
    color: #fff;
    font-size: 14px;
    cursor: pointer; /* 鼠标悬浮显示指针 */
    transition: background 0.3s;
}

.searchBtn:hover {
    background: #333;
}

/* 天气卡片容器 */
.weather-container {
    margin-top: 130px;
    width: 100%;
    padding: 50px 20px;
    display: flex;
    justify-content: center;
}

.weather-cards {
    display: flex;
    flex-wrap: wrap; /* 适配小屏幕，自动换行 */
    gap: 20px; /* 卡片间距 */
    justify-content: center;
    max-width: 1200px; /* 限制最大宽度，避免卡片过散 */
}

/* 天气卡片样式（含移入放大效果） */
.weather-card {
    width: 150px;
    height: 250px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.6s ease; /* 平滑过渡 */
}

.weather-card:hover {
    transform: scale(1.05); /* 移入放大5% */
    background: rgba(0, 0, 0, 0.5); /* 背景加深，增强反馈 */
}

/* 卡片内部元素样式 */
.weather-card div {
    margin-bottom: 8px;
    text-align: center;
}

.weather-card .date {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.weather-card img {
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
}

.weather-card .temp {
    font-size: 16px;
    font-weight: bold;
}

.weather-card .text, .weather-card .wind, .weather-card .humidity {
    font-size: 14px;
}

.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 50px;
    line-height: 50px;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

.footer a:hover {
    color: #fff;
}
.boxq{
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .5);
}
.weather-modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 1000;
}


.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 600px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.close-btn {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #f00;

}
